package org.qqcui.designpattern.patterns.strategy;

/**
 * 策略模式客户端
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022/5/7 15:23
 **/
public class Client {

    public static void main(String[] args) {
        WildDuck wildDuck = new WildDuck();
        wildDuck.display();

        PekingDuck pekingDuck = new PekingDuck();
        pekingDuck.display();

        ToyDuck toyDuck = new ToyDuck();
        toyDuck.display();

        System.out.println("一只飞不动的野鸭");
        wildDuck.setFlyBehavior(new BadFlyBehavior());
        wildDuck.display();
    }
}
